package com.dgut.autoconfig;

import ch.qos.logback.classic.Logger;
import lombok.Data;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;
/*
    事件类
 */
@Data
public class MailSendEvent extends ApplicationEvent {
private String to;
private String message;

    public String getTo() {
        return to;
    }

    public String getMessage() {
        return message;
    }
    private static final Logger log= (Logger) LoggerFactory.getLogger(MailSendEvent.class);
    public MailSendEvent(Object source, String to, String message){
    super(source);
    this.to=to;
    this.message=message;
log.info("添加事件成功!,message:{}",message);
}
}
